<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*" errorPage=""%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>网上书店项目实训</title>
    <script type="text/javascript" type="">
        function RegsiterSubmit(){
            with(document.Regsiter){
                var user=loginNamae.value;
                var pass=password.value;
                if(user==null||user==""){alter("请填写密码");}
                else if(pass==null||pass==""){alert("请填写密码");}
                else submit();
            }
        }
        function loadimage(){
                document.getElementById("randImage").src ="image.jsp?"
                    + Math.random();
            }

    </script>
</head>
<body>
<table>
    <tr><td align="center"><p>
        <font color="red" size="font-family:simhei">请登录：</font><p>
        <form method="post" name="Register" action="checkuser.jsp" target="_blank"><p>
        用户名:<input type="text" name="loginName" size="20"><p>
        密码:<input type="password" name="password" size="20"><p>
        <input type="button" value="提交" name="B1" onclick="RegsiterSubmit()">
        <input type="reset" value="重置" name="B2"><p>
        验证码：<input type="text" name="rand" size="20">
        <img alt="code..." name="randImage" id="randImage" src="image.jsp"  width="60" height="20"
             border="1" align="absmiddle">
        <a href="javascript:loadimage();"><font class=pt95>看不清点我</font></a>

        <input type="submit" name="login" value="验证码提交" >
        </form>
    </td></tr>
</table>
</body>
</html>
